import logging

# 定义日志函数
def log_init(log_name):
    path = "/data/logs/"
    logging.basicConfig(filename=path + log_name, level=logging.INFO, format='%(asctime)s %(levelname)s %(message)s',
                        datefmt='%Y-%m-%d %H:%M:%S', filemode='a')
    logging.getLogger("requests").setLevel(logging.WARNING)
    logging.getLogger("urllib3").setLevel(logging.WARNING)
    logging.getLogger("werkzeug").setLevel(logging.WARNING)
    return logging.basicConfig
